﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _13AI状态类
{
    /// <summary>
    /// 环境类-NPC类
    /// 拥有状态的类
    /// </summary>
    class Monster
    {
        public string Name { get; set; }
        public AIState NpcState { get; set; }

        //是否看到玩家
        public bool IsLookPlayer{get;set;}=false;

        public float ToPlayerDistance { get; set; } = 30f;

        public Monster(string name)
        {
            Name = name;
            NpcState = new PatrolState(this);
        }

        public void AIRequest()
        {
            NpcState.Handle();  //执行状态
        }
    }
}
